class ContextChain:
    def __init__(self):
        self.slots = []

    def add_slot(self, slot):
        self.slots.append(slot)

    def as_prompt(self):
        return '\n'.join([f"{s.role}: {s.content}" for s in self.slots])

